home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / cp1.zip / BORL2ZIP.C1 < prev    next >
Text File  |  1993-05-12  |  3KB  |  96 lines

  1. ===========================================================================
  2.  BBS: The Abacus * HST/DS * Potterville MI
  3. Date: 05-08-93 (02:28)             Number: 33
  4. From: RICARDO GUIMARAES            Refer#: NONE
  5.   To: DAVE GOMBOC                   Recvd: NO  
  6. Subj: BORL2ZIP.C - 1 of 2            Conf: (36) C Language
  7. ---------------------------------------------------------------------------
  8. DG> 4)  Actually, a comment:  I really hate having to put in each of 15 disks
  9. DG>     every time I install something!  I first installed just BC and BCC for
  10. DG>     dos, then deleted (other) stuff and found room for TPROF, and later
  11. DG>     for TASM.  I'd like to see this change in the next release.
  12.  
  13. Maybe this can help :)
  14.  
  15. /*  BORL2ZIP.C
  16.         Program to join several split (*.CA?) files in the Borland C++
  17.         disks into one ZIP file. Just get the right disks as indicated
  18.         in FILELIST.DOC and keep feeding the program disks until the last
  19.         one, then select [E]nd
  20.  
  21.         Copyright 1993 by Ricardo Guimaraes.
  22.         NetMail: 1:107/570
  23.         Internet: guimar@icarus.montclair.edu
  24.  
  25.         This program is freeware.
  26. */
  27.  
  28.  
  29. #include <string.h>
  30. #include <ctype.h>
  31. #include <conio.h>
  32. #include <stdlib.h>
  33. #include <stdio.h>
  34.  
  35. #define BUFSIZE 32*1024
  36.  
  37. int main( int argc, char **argv )
  38. {
  39.         int GetMore(void);
  40.         int QuitNow(void);
  41.         int done,counter;
  42.         int size;
  43.         char iname[65], oname[65];
  44.         char *buffer;
  45.         char str[18];
  46.         FILE *Source;
  47.         FILE *NewFile;
  48.  
  49.         if ( argc!=3 ){
  50.                 printf("\n\t*** BORL2ZIP - Copyright 1993 by "
  51.                        "Ricardo Guimaraes ***\n");
  52.                 printf("\nUsage:\tBORL2ZIP SourceFile DestFile\n");
  53.                 printf("\tGive the Source and Destination filenames ");
  54.                 printf("without the extension.\n");
  55.                 exit(1);
  56.         }
  57.  
  58.         strcpy(oname,argv[2]);
  59.         strcat(oname,".ZIP");
  60.         NewFile = fopen(oname,"wb");
  61.         if (!NewFile){
  62.                 printf("\nError creating %s\n",oname);
  63.                 exit(1);
  64.         }
  65.         buffer = malloc(BUFSIZE);
  66.         if ( buffer==0 ){
  67.                 printf("Not enough memory!\n");
  68.                 exit(1);
  69.         }
  70.         counter = 1;
  71.         strcpy(iname,argv[1]);
  72.         strcat(iname,".CA1");
  73.         done=0;
  74.         printf("\n");
  75.         while (!done){
  76.                 printf("Getting file %s...                    \n",iname);
  77.                 while ( (Source = fopen(iname,"rb")) == NULL ){
  78.                         if ( QuitNow() ){
  79.                                 done=1;
  80.                                 break;
  81.                         }
  82.                 }
  83.                 if (done) continue;
  84.  
  85.                 fseek(Source,5,0);      /* skip over header */
  86.  
  87.  
  88.  * SLMR 2.1a * puts("grila!");
  89.  
  90.  
  91. --- WM v2.07/91-0165
  92.  * Origin: TrailBlaZer BBS HST * 201-742-1860 Paterson, NJ  (1:107/48)
  93. SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1
  94. SEEN-BY: 153/752 154/40 77 157/2 159/100 125 575 950 203/23 209/209 261/1023
  95. SEEN-BY: 280/1 390/1 396/1 5 15 2270/1 2440/5 3603/20
  96.